<?php

declare (strict_types = 1);

namespace app\api\model\user;

use app\api\model\Goods;
use app\api\model\lottery\Lottery;
use app\api\model\User;
use app\common\model\user\Posts as PostsModel;
use think\model\relation\HasOne;


class Posts extends PostsModel
{
    /**
     * 隐藏字段
     * @var array
     */
    protected $hidden = [
        'store_id',
    ];

    public function user():HasOne
    {
        return $this->hasOne(User::class,'user_id','user_id');
    }

    public function relationActivity():HasOne
    {
        return $this->hasOne(Lottery::class,'id','activity_id');
    }
}